import fetch from '@/utils/request'
// import { getToken } from '@/utils/auth'
import { addParams } from './common.js'

// 查询代付交易列表
export function queryPaidList(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/listpayerrorno',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 查询代付交易处理记录
export function queryPaidRecord(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/listpayerroryes',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 核销代付交易
export function modifyPaidList(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/updatepaywithholderror',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 置异常代付交易
export function toAbnormityOrder(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/updatestatus',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 查询代付交易详情
export function queryPaidItem(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/payforgetbyid',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 查询代扣交易列表
export function queryDeductedList(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/listwithholderrorno',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 查询代扣交易处理记录
export function queryDeductedRecord(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        baseURL: '',
        url: '/api/allinpay.transfer.bill/pay/bill/listwithholderroryes',
        method: 'post',
        data: data,
        params: uploadParams
    })
}

// 下载报表
export function listBalanceExcel(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        url: '/api/allinpay.bidding.aggregation/queryAccountFilePage',
        method: 'post',
        params: uploadParams,
        data: data
    })
}

// 日运营报表
export function listBadsafhskdjf(params, data) {
    const uploadParams = addParams(params)
    return fetch({
        url: '/api/allinpay.bidding.aggregation/queryAccountFilePage',
        method: 'post',
        params: uploadParams,
        data: data
    })
}